package com.bank.study;

import com.bank.study.pojo.Product;

import java.lang.management.ManagementFactory;

public class AgentTestDemo {
    public static void main(String[] args) throws Exception {
        System.out.println( "selectProductList Change Implement before");
        String name = ManagementFactory.getRuntimeMXBean().getName();
        System.out.println(name);
        // get pid
        String pid = name.split("@")[0];
        System.out.println("Pid is: " + pid);
        Product product = new Product(1,"手机",1,5800D);
        System.out.println( product.toString());
        while (true){
            product.setProductName("手机2");
            System.out.println( "selectProductList Change Implement after");
            System.out.println( product.toString());
            Thread.sleep(1000);
        }
    }
}
